/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.oop;

/**
 * <p>Project: javase2203 - User
 * <p>Powered by webrx On 2022-07-21 09:27:03
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class User extends Person{
    private String name;
    {
        System.out.println("User 初始化");
    }

    static{
        System.out.println("User static 程序块");
    }

    public User(){
        //super(); 默认调用父类的构造方法，不写也。如果编写了必须在第一行代码上。也可以写参数调用指定参数的构造方法
        super("ok");
        System.out.println("User()无参构造方法");
    }

    public User(String name){
        //super(name); super();
    }
}
